﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Taobao.Tools2.Domain.EntityFramework.Mappings;

namespace Taobao.Tools2.Domain.EntityFramework
{
    public class LogMapping : ModelMapping<Log>
    {
        public LogMapping()
            : base()
        {
            Map(d => d.ToTable("Log"));
            Property(c => c.Module).HasColumnName("module");
            Property(c => c.Message).HasColumnName("message");
            Property(c => c.TraceStack).HasColumnName("tracestack");
            Property(c => c.Type).HasColumnName("type");
            Property(c => c.Created).HasColumnName("created");
            HasKey(c => c.ID);

            Property(c => c.ShopID).HasColumnName("shopid");
            //HasRequired(c => c.Shop).WithOptional().Map(c => c.MapKey("shopid"));
        }
    }
}
